package com.itheima.jdk8date;

import java.time.LocalDateTime;

public class Demo04 {

    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime dateTime = now.withYear(2020);
        System.out.println(dateTime);
        System.out.println(now.withMonth(5));
        System.out.println(now.withDayOfMonth(5));
        System.out.println(now.withDayOfYear(100));
        System.out.println(now.withHour(10));
        System.out.println(now.withMinute(35));
        System.out.println(now.withSecond(10));

    }
}
